package com.ymatou.c2cliveindexer.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*将数据建立索引置于索引区接口Call
*FreeMaker Template自动生成代码
*/
public class C2cLiveCall extends YmatouBaseCall{
	private static String opurl ="index/c2clive?";
	public C2cLiveCall() {
		super(EnvSetup.getSystemUrl("c2cLiveIndexer"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	// 获取status
		public String getStatus() {
			String status = null;
			try {
				JSONObject jo = new JSONObject(getReturnData());
				status = jo.getString("status");
			} catch (Exception e) {
				e.printStackTrace();
			}
			return status;
		}
}